package com.itheima.socketdemo6;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class ClientDemo {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("127.0.0.1", 10001);
        OutputStream os = socket.getOutputStream();
        String msg = "hello, 你好";
        os.write(msg.getBytes("UTF-8"));

        os.close();
        socket.close();
    }
}
